using System;
using System.Collections.Generic;
using System.Data;

namespace BlazorSodDbManager.Models
{
    public class QueryResult
    {
        public bool IsSuccess { get; set; }
        public string? ErrorMessage { get; set; }
        public List<DataTable> ResultSets { get; set; } = new List<DataTable>();
        public int RowsAffected { get; set; }
        public TimeSpan ExecutionTime { get; set; }
        public string Query { get; set; } = string.Empty;
        
        // 分页相关属性
        public int TotalRecords { get; set; }
        public int PageSize { get; set; }
        public int CurrentPage { get; set; }
        public int TotalPages => (TotalRecords + PageSize - 1) / PageSize;
        public bool HasPreviousPage => CurrentPage > 1;
        public bool HasNextPage => CurrentPage < TotalPages;
    }
} 